<%@ page import="com.news.db.OpDB" %>
<%@ page import="com.news.model.News" %>
<%@ page import="java.util.ArrayList" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
  // 获取虚拟目录
  String path = request.getContextPath();
  // url:               协议                       主机                        端口号             虚拟目录
  String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>新闻内容</title>
    <link rel="stylesheet" href="CSS/style.css">
  </head>
  <body>
    <div id="top"><%@ include file="top.jsp" %></div>

    <div style="width:900px;height:500px;">
      <table border="1" width="900px;" height="500px" cellspacing="0" cellpadding="0" rules="rows">
        <%
          int id = Integer.parseInt(request.getParameter("id"));
          News n = opdb.OpGetNewsInfo(id);
          if(n != null){
        %>
        <tr>
          <td align="center">
            <font style="font-family:黑体;font-size:25px;"><%=n.getInfo_title()%></font><br><br>
            <font style="font-size:16px;color: gray;">
              <%=n.getInfo_date()%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=n.getInfo_creator()%>
            </font>
          </td>
        </tr>
        <tr>
          <td><%=n.getInfo_content()%></td>
        </tr>
        <%
          }
        %>
      </table>
    </div>

    <div id="end"><%@ include file="end.jsp" %></div>
  </body>
</html>